<template>
  <div class="text-center">
    <v-bottom-sheet v-model="sheet" inset>
      <template v-slot:activator="{ on, attrs }">
        <v-btn color="orange" v-if="sheet" dark v-bind="attrs" v-on="on">登录按钮(好丑)</v-btn>
      </template>
      <v-sheet class="text-center" height="200px">
        <v-card class="overflow-hidden" @submit.prevent="login">
            <v-form class="pa-5">
            <v-text-field v-model="loginModel.username" label="用户名"></v-text-field>

            <v-text-field v-model="loginModel.password" label="密码" type="password"></v-text-field>
            <v-btn color="success" type="submit">登录</v-btn>
            </v-form>
        </v-card>
        </v-sheet>
    </v-bottom-sheet>
  </div>
</template>

<script>
export default{
    data: () => ({
      sheet: false,
      loginModel:{}
    }),
    methods: {
        async login(){
            await this.$auth.loginWith('local',{
                data:this.loginModel
            })
            this.sheet = false
        }
    },
}
</script>


<style scoped>
</style>
